//
//  MessageController.swift
//  01weibo
//
//  Created by 李想 on 16/6/2.
//  Copyright © 2016年 李想. All rights reserved.
//

import UIKit

class MessageController: RootController {



    override func loadView() {
        super.loadView()
        let uiview = UIView()
        let uiviewFrame = CGRectInset(self.view.bounds, 150, 250)
        uiview.backgroundColor = UIColor.blackColor()
        uiview.frame = uiviewFrame
        self.view.addSubview(uiview)
        
        print("000")
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        let uiview = UIView()
        let uiviewFrame = CGRectInset(self.view.bounds, 100, 280)
        uiview.backgroundColor = UIColor.blueColor()
        uiview.frame = uiviewFrame
        self.view.addSubview(uiview)
        
        print("111")
    }
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(false)
        let uiview = UIView()
        let uiviewFrame = CGRectInset(self.view.bounds, 90, 300)
        uiview.backgroundColor = UIColor.yellowColor()
        uiview.frame = uiviewFrame
        self.view.addSubview(uiview)
    
        print("222")
    }
    override func viewWillLayoutSubviews() {
        let uiview = UIView()
        let uiviewFrame = CGRectInset(self.view.bounds, 70, 320)
        uiview.backgroundColor = UIColor.redColor()
        uiview.frame = uiviewFrame
        self.view.addSubview(uiview)
        
        print("333")
    }
    

    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
